package com.ylh.blog.dao;

        import com.ylh.blog.pojo.Type;
        import org.springframework.data.domain.Pageable;
        import org.springframework.data.jpa.repository.JpaRepository;

        import org.springframework.data.jpa.repository.Query;

        import java.util.List;

public interface TypeRepository extends JpaRepository<Type,Long>{
    @Query(value = "select * from t_type", nativeQuery = true)
    List<Type> findTop(Pageable pageable);

    Type findByName(String name);
}
